package com.gitee.wsl.net.client.validator


import io.ktor.client.*
import io.ktor.client.plugins.api.*
import io.ktor.client.statement.*

internal object ResponseBodyTransformed : ClientHook<suspend (content: Any) -> Unit> {
    override fun install(
        client: HttpClient,
        handler: suspend (content: Any) -> Unit,
    ) {
        client.responsePipeline.intercept(HttpResponsePipeline.After) {
            handler(subject)
        }
    }
}